package echat.future.cn.echat.my.view;

import android.content.Intent;
import android.support.v7.widget.LinearLayoutManager;
import android.view.LayoutInflater;
import android.view.View;

import java.util.ArrayList;
import java.util.List;

import echat.future.cn.echat.R;
import echat.future.cn.echat.databinding.ActivityDivingListBinding;
import echat.future.cn.echat.my.adapter.DivingAdapter;
import echat.future.cn.echat.my.weight.Navagation.AdapterNavagation;
import echat.future.cn.echat.my.weight.Navagation.IBaseNavagation;

/**
 * 潜水名单
 */
public class DivingListActivity extends BaseActivity<ActivityDivingListBinding>{

    DivingAdapter divingAdapter;
    List<String> mData = new ArrayList<>();

    private View emptyView;

    @Override
    public int layoutId() {
        return R.layout.activity_diving_list;
    }

    @Override
    public IBaseNavagation navagation() {
        return new AdapterNavagation(this).setTitle("潜水名单",16,R.color.white).setBack(R.drawable.btn_back).setNavagationBackgroudColor(R.color.color_161823);
    }

    @Override
    public void initView() {
        divingAdapter = new DivingAdapter(mData);
        emptyView = LayoutInflater.from(this).inflate(R.layout.item_withdraw_empey,null);
        divingAdapter.setEmptyView(emptyView);
        bind.recyclerView.setLayoutManager(new LinearLayoutManager(this));
        bind.recyclerView.setAdapter(divingAdapter);

        loadData();
    }

    private void loadData(){
        mData.add("");
        mData.add("");
        mData.add("");
        mData.add("");
        divingAdapter.notifyDataSetChanged();
    }
}
